

LIBNAME=myfile
APPNAME=main
LIBPATH=`pwd`/./lib
CFLAGS+=-I${LIBPATH}
LDFLAGS+=-L${LIBPATH} -L./lib/lib
LIBS=-l${LIBNAME} -l:libsqlite3.so.0

CC=gcc

all:
	make -C src
	${CC} ${CFLAGS} main.c -o ${APPNAME} ${LDFLAGS} ${LIBS}

clean:
	rm -f *.o
	rm -f ${APPNAME}

run:
	export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBPATH} &&./${APPNAME} -i 192.168.0.10 -p 12315 -t 5 -d
